<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>最新内容-农业知识交流论坛</title>

    <link rel="stylesheet" th:href="@{/swiper/swiper.min.css}">
    <link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <link rel="stylesheet" th:href="@{/css/mycss.css}">
    <link rel="stylesheet" th:href="@{/zplayer/css/zplayer.min.css}">
    <script th:src="@{/zplayer/js/zplayer.min.js}"></script>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2080705_x7u3h1yrrfc.css">
</head>
<body>
<div th:replace="~{common/header::header(activeUrl='two')}"></div>

<main role="main">

    <div class="container">

        <div class="row">
            <!-- 左侧菜单 -->
            <div class="col-md-2">
                <div th:replace="index::bar">
                </div>
            </div>

            <div class="col-md-8">
                <br>
                <hr class="layui-bg-blue">

                <div class="blog-main">

                    <div class="my-3 p-3 bg-white rounded shadow-sm">

                        <div th:if="${blogs.getDatas().size()<=0}">
                            <div class="media text-muted pt-3">还没有最新发现~ &emsp;&emsp;
                            </div>
                        </div>
                        <div th:if="${blogs.getDatas().size()>0}">
                            <div th:each="blog:${blogs.getDatas()}" class="media text-muted pt-3">


                                <p th:if="${blog.getSort()==0}" class="media-body pb-3 mb-0 small lh-125 border-bottom border-gray" style="margin-left: 5px;overflow: hidden;text-overflow: ellipsis;">
                                    <!-- 标题 -->
                                    <a th:text="${blog.getTitle()}" style="font-size: 14px"
                                       th:href="@{'/article/read/'+${blog.getBid()}+'/'+${blog.getAuthorId()}}"
                                       class="text-dark font-weight-bold text-decoration-none d-block">
                                    </a>
                                    <br>
                                    <!-- 头像 -->
                                    <img th:src="${blog.getAuthorAvatar()}" style="border-radius: 5px " width="18" height="18">

                                    <a th:text="${blog.getAuthorName()}" style="font-size: 13px"
                                       th:href="@{'/article/'+${blog.getAuthorId()}}"
                                       class="text-dark font-weight-bold text-decoration-none" target="_blank">
                                    </a>

                                    <span th:text="${blog.getOriginal()==1?'原创':''}"
                                          class="badge badge-light u-content-tab">
                                    </span>&emsp;
                                    <!--内容摘要-->
                                    <span th:text="${#strings.abbreviate(blog.getContent(),100)}"
                                          class="badge u-content-zy">
                                    </span>

                                    <!--收藏-->
                                    <span class="float-right"><i class="iconfont icon-pinglunliang" style="font-size: 12px;"></i>
                                        [[${blog.getComment()}]]
                                    </span>&emsp;

                                    <!-- 浏览量 -->
                                    <span class="float-right"><i class="iconfont icon-liulan" style="font-size: 12px;"></i>
                                        [[${blog.getViews()}]]&emsp;&emsp;
                                    </span>

                                </p>
                            </div>


                            <!--分页-->
                            <nav aria-label="Page navigation example" class="mt-4">
                                <ul class="pagination justify-content-center pagination-sm">
                                    <li th:class="${blogs.getPageInfo().isHasPreviousPage()==true?'page-item':'page-item disabled'}">
                                        <a class="page-link" th:href="@{'/newblog/'+${blogs.getPageInfo().pageNum -1}+'/10'}" tabindex=""><&nbsp;</a>
                                    </li>
                                    <li class="page-item" th:if="${blogs.getPageInfo().isHasPreviousPage()}">
                                        <a class="page-link" th:href="@{'/newblog/'+${blogs.getPageInfo().pageNum -1}+'/10'}" th:text="${blogs.getPageInfo().pageNum -1}"></a>
                                    </li>
                                    <li class="page-item active">
                                        <a class="page-link" th:href="@{'/newblog/'+${blogs.getPageInfo().pageNum}+'/10'}" th:text="${blogs.getPageInfo().pageNum}"></a>
                                    </li>
                                    <li class="page-item" th:if="${blogs.getPageInfo().isHasNextPage()}">
                                        <a class="page-link" th:href="@{'/newblog/'+${blogs.getPageInfo().pageNum +1}+'/10'}" th:text="${blogs.getPageInfo().pageNum +1}"></a>
                                    </li>
                                    <li th:class="${blogs.getPageInfo().isHasNextPage()==true?'page-item':'page-item disabled'}">
                                        <a class="page-link"  th:href="@{'/newblog/'+${blogs.getPageInfo().pageNum +1}+'/10'}" >&nbsp;></a>
                                    </li>
                                </ul>
                            </nav>
                        </div>
                    </div>
                </div>

            </div>
            <!-- 右侧区域-->
            <div class="col-md-2">
                <div th:replace="common/musicPlayer::musicPlayer"></div>
            </div>

        </div>

        <div class="row">
            <div class="col-md-2"></div>
            <div class="col-md-8"></div>
        </div>

        <hr class="layui-bg-blue">

        <div th:replace="common/musicPlayer::musicPlayer"></div>
    </div>
</main>

<div th:replace="~{common/footer::footer}"></div>

<a class="to-top"><i class="iconfont icon-fanhuidingbu1" style="font-size:50px;color: #007bff"></i></a>
<script th:src="@{/js/jquery-3.5.1.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
<script th:src="@{/swiper/swiper-3.4.2.jquery.min.js}"></script>
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/layui/layui.all.js}"></script>
<script th:src="@{/js/toTop.js}"></script>
<script type="text/javascript" th:src="@{/js/myswiper.js}"></script>
<script th:src="@{/js/daohang.js}"></script>
</body>
</html>